//
//  ZLPullMenu.h
//  ZLPullMenu
//
//  Created by 科大 on 2024/5/27.
//

#import <UIKit/UIKit.h>
#import "ZLPullMenuContentView.h"
#import "ZLIndexPath.h"
#import "ZLPullMenuItem.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, ZLPullMenuLayout) {
    ZLPullMenuLayoutDefault,    /// 线性布局
    ZLPullMenuLayoutCenter,     /// 居中
};

@protocol ZLPullMenuDelegate <NSObject>
/// 即将选中
/// - Parameter indexPath: 下标
- (BOOL)pullMenuWillSelected:(ZLIndexPath *)indexPath;
/// 已经选中
/// - Parameter indexPath: 下标
- (void)pullMenuDidSelected:(ZLIndexPath *)indexPath;
@end

@interface ZLPullMenu : UIView
/// 代理
@property (nonatomic, weak) id<ZLPullMenuDelegate> delegate;
/// 数据源
@property (nonatomic, copy) NSArray<ZLPullMenuItem *> *menus;
/// 缩进
@property (nonatomic, assign) UIEdgeInsets insets;
/// 间隔
@property (nonatomic, assign) CGFloat interval;
/// 布局
@property (nonatomic, assign) ZLPullMenuLayout layoutMode;

/// 刷新
- (void)reloadData;

/// 关闭
- (void)closeMenu;

@end

NS_ASSUME_NONNULL_END
